//
//  XMLHallNumberListModel.m
//  ppkc2016
//
//  Created by 拼凑的断音 on 16/4/19.
//  Copyright © 2016年 拼凑的断音. All rights reserved.
//

#import "XMLHallNumberListModel.h"
#import "XXTool.h"

@implementation XMLHallNumberListModel

+(void)requestHallNoListWithComletion:(void (^)(BOOL, NSMutableArray<XMLHallNumberListModel *> *))block
{
    [DKHTTPRequest sendDataWithShortUrl:@"electronic_catalogue_list"
                                  Param:[XXTool formatStringWithLanguage:[NSString stringWithFormat:@""]]
                             ImageArray:nil
                                TimeOut:10
                             Completion:^BOOL(NSMutableDictionary *serverDic, DKHTTPResponseType bufferType) {
                                 if ([[serverDic objectForKey:@"code"] intValue]==200)
                                 {
                                     NSMutableArray <XMLHallNumberListModel* > *list = [NSMutableArray array];
                                     if ([[serverDic objectForKey:@"total"] intValue]!=0)
                                     {
                                         NSArray *tempArray = [serverDic objectForKey:@"list"];
                                         for (NSDictionary *temp in tempArray)
                                         {
                                             [list addObject:[XMLHallNumberListModel modelWithDictionary:temp]];
                                         }
                                     }
                                     block(YES,list);
                                     return YES;
                                 }
                                 else
                                 {
                                     block(NO,nil);
                                     return NO;
                                 }
                             } IsBuffering:YES
                      IsNeedReplaceWrap:NO
                        IsUseUpLoadHead:NO];
}

@end
